package com.wu.d2_api;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class test {
    public static void main(String[] args) throws ParseException {
        String start ="2023-11-11 0:0:0";
        String end ="2023-11-11 0:10:0";
        String xj ="2023-11-11 0:1:12";
        String xp ="2023-11-11 0:10:56";

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date s1 =sdf.parse(start);
        Date s2 =sdf.parse(end);
        Date s3 =sdf.parse(xj);
        Date s4 =sdf.parse(xp);

        long starttime = s1.getTime();
        long endtime = s2.getTime();
        long xjtime = s3.getTime();
        long xptime = s4.getTime();

        if(xjtime>starttime && xjtime<endtime){
            System.out.println("xj win");
        }
        else{
            System.out.println("xj lose");
        }

        if(xptime>starttime && xptime<endtime){
            System.out.println("xp win");
        }
        else{
            System.out.println("xp lose");
        }
    }
}
